/**
 * Project  : monkey
 * Author   : Wu Tian Qiang
 * Date     : 2016/10/18 20:49:30
 */
Ext.define('Monkey.view.user.ChangeStatusWindow', {
    extend: 'Ext.window.Window',

    controller: 'ctrl-user',
    closable: true,
    resizable: false,
    constrain: true,
    constrainHeader: true,
    modal: true,
    frameHeader: false,
    frame: true,
    maximizable: false,
    icon: 'resources/icons/16/user_alert.png',
    layout: 'fit',
    width: 360,
    height: 155,
    initComponent: function () {
        var form = {
            xtype: 'form',
            border: false,
            buttonAlign: 'center',
            reference: 'form',
            layout: 'form',
            bodyStyle: 'padding:15px 5px 0 5px',
            defaults: {
                labelWidth: 80,
                labelAlign: 'right'
            },
            defaultType: 'textfield',
            buttons: [{
                formBind: true,
                text: '确定',
                iconCls: 'accept',
                handler: 'changeStatusOK'
            }, {
                text: '取消',
                iconCls: 'delete',
                handler: 'cancel'
            }]
        };

        form.items = [{
            name: 'reason',
            maxLength: '100',
            xtype: 'textareafield',
            grow: true,
            allowBlank: false,
            fieldLabel: '<span style="color: red;">*</span>原因'
        }, {
            name: 'userIds',
            xtype: 'hidden'
        }, {
            name: 'status',
            xtype: 'hidden'
        }];

        this.items = [form];
        this.callParent();
    }
});